home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c,comp.std.c
- Path: in2.uu.net!world!mv!usenet
- From: ENGR@GSSI.MV.COM (Michael Furman)
- Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
- Message-ID: <DLtABq.Fzu@mv.mv.com>
- Mime-Version: 1.0
- Organization: GSSI
- Date: Fri, 26 Jan 1996 23:23:49 GMT
- References: <30C40F77.53B5@swsbbs.com> <SPENCER.96Jan22113215@zorgon.ERA.COM> <KANZE.96Jan26164833@gabi.gabi-soft.fr>
- X-Newsreader: WinVN 0.93.10
- X-Nntp-Posting-Host: gssi.mv.com
-
- In article <KANZE.96Jan26164833@gabi.gabi-soft.fr>, kanze@gabi.gabi-soft.fr
- says...
- >
- >In article <DLoy4x.AFG@mv.mv.com> ENGR@GSSI.MV.COM (Michael Furman)
- >writes:
- >
- >> Could somebody please clarify is "C" standard so strict and does not let
- >> use some constructions that "C++" draft stadard let? Namely:
- >
- >> 1. Integer conversion when source value can not be represented in
- destination
- >> type. In C++ it is defined. In case of both unsigned types it completely
- >> defined in standard; othervise details of "how it will be converted" must
- >> be defined by implementation.
- >
- >I don't see any difference in meaning in the two standards:
- >
- >C (ISO 9899, section 6.2.1.2): "When a value with integral type is
- >demoted to a signed integer with smaller size, or an unsigned integer is
- >converted to its corresponding signed integer, if the value cannot be
- >represented the result is implementation defined."
- >
- >C++ (Sept. 1995 draft, section 4.7): "If the destination type is signed,
- >the value is unchanged if it can be represented in the destination type
- >(and bitfield width); otherwise the value is implementation defined."
- >
- >Could you clarify where you see the difference?
-
- No, I do not see any difference.
-
- >
- >> 2. Implementation extention: additional forms of function main, like:
- >>
- >> int main(int argc, char * * argv, char * env);
- >>
- >> In C++ draft standard said that any implementation must allow 2 kinds if
- >> "main" definitions, but does not forbid extentions.
- >
- >Existing practice? Reality? The rule that forbids extensions in the C
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- My question was: is such rule exists?
-
- >standard is completely ignored, as far as I can tell. All of the Unix
- >compilers I'm familiar with, for example, allow the version you cite (or
- >rather a version with a char** as third parameter).
- >--
- >James Kanze (+33) 88 14 49 00 email: kanze@gabi-soft.fr
- >GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
- >Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
- > -- A la recherche d'une activitΘ dans une region francophone
-
- --
- <<<<<<<< This is a copy of post to the newsgroup >>>>>>>>
- ---------------------------------------------------------------
- Michael Furman, (603)893-1109
- Geophysical Survey Systems, Inc. fax:(603)889-3984
- 13 Klein Drive - P.O. Box 97 engr@gssi.mv.com
- North Salem, NH 03073-0097 71543.1334@compuserve.com
- ---------------------------------------------------------------
-
-